﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;

namespace SWTI_BlackSoft_CSharp.Models
{
    public class Unidad
    {
        public int id { get; set; }
        public string placa { get; set; }

        [Display(Name = "Año")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy}", ApplyFormatInEditMode = true)]
        public DateTime anio { get; set; }
        public int capacidad { get; set; }
        public string motor { get; set; }
        public int estado { get; set; }
    }

    public class UnidadDBContext : DbContext
    {
        public DbSet<Unidad> Unidades { get; set; }
    }

}